home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr44 / xlib06p1.zip / XTEXT.H < prev    next >
C/C++ Source or Header  |  1995-03-05  |  3KB  |  85 lines

  1. /*-----------------------------------------------------------------------
  2. ;
  3. ; XTEXT - header file
  4. ;
  5. ;
  6. ;
  7. ; ****** XLIB - Mode X graphics library                ****************
  8. ; ******                                               ****************
  9. ; ****** Written By Themie Gouthas                     ****************
  10. ;
  11. ; egg@dstos3.dsto.gov.au
  12. ; teg@bart.dsto.gov.au
  13. ;
  14. ;  Terminology & notes:
  15. ;         VRAM ==   Video RAM
  16. ;         SRAM ==   System RAM
  17. ;         X coordinates are in pixels unless explicitly stated
  18. ;
  19. ;-----------------------------------------------------------------------*/
  20.  
  21. #ifndef _XTEXT_H_
  22. #define _XTEXT_H_
  23.  
  24. #include "xdefs.h"
  25.  
  26. #define FONT_8x8  0
  27. #define FONT_8x15 1
  28. #define FONT_USER 2
  29.  
  30. /* FUNCTIONS =========================================================== */
  31.  
  32. WORD x_text_init(void);            /* Initialize text functionns  */
  33.  
  34. void x_set_font(
  35.    int FontId);             /* Set the font style          */
  36.  
  37. void x_register_userfont(          /* register a user defined font */
  38.    BYTE * UserFontPtr);
  39.  
  40. unsigned int  x_char_put(          /* Draw a text character using  */
  41.    char ch,                  /* the currently active font    */
  42.    xScreenCoord_t X,
  43.    xScreenCoord_t Y,
  44.    xPageHandle_t PgOffs,
  45.    xColor_t Color);
  46.  
  47.  
  48. unsigned int  x_get_char_width(    /* Get the character width      */
  49.    char ch);
  50.  
  51.  
  52. /* the folowing function is from xprintf.c but is included due to its     */
  53. /* close relationship with this module                                    */
  54.  
  55. void x_printf(                          /* formatted text output */
  56.   xScreenCoord_t x,
  57.   xScreenCoord_t y,
  58.   xPageHandle_t ScrnOffs,
  59.   xColor_t color,
  60.   char *ln,...);
  61.  
  62. void x_bgprintf(                          /* formatted text output */
  63.   xScreenCoord_t x,
  64.   xScreenCoord_t y,
  65.   xPageHandle_t ScrnOffs,
  66.   xColor_t fgcolor,
  67.   xColor_t bgcolor,
  68.   char *ln,...);
  69.  
  70. /* VARIABLES =========================================================== */
  71.  
  72. extern BYTE CharHeight;     /* Char height of currently active font        */
  73. extern BYTE CharWidth;      /* Char width of currently active font         */
  74. extern BYTE FirstChar;      /* First char in the curr. active font         */
  75.  
  76. extern BYTE UserCharHeight; /* Char height of currentle regist'd user font */
  77. extern BYTE UserCharWidth;  /* Char height of currentle regist'd user font */
  78. extern BYTE UserFirstChar;  /* First char of the curr. regist'd usera font */
  79.  
  80.  
  81.  
  82. #endif
  83.  
  84.  
  85.